<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Insert title here</title>

<script type="text/javascript" src="js/lib/jquery-1.10.2.js"></script>
<script type="text/javascript" src="js/lib/xml2json.js"></script>
<script type="text/javascript" src="js/crvapp/jsonUtil.js"></script>
<script type="text/javascript" src="js/crvapp/stockageUtil.js"></script>
<script type="text/javascript" src="js/crvapp/beans/grade.js"></script>
<script type="text/javascript" src="js/crvapp/beans/test.js"></script>

<script type="text/javascript" src="js/crvapp/crva.js"></script>
</head>
<body>
	<label></label>
	<p></p>
<!-- 	<table> -->
<!-- 		<thead> -->
<!-- 			<tr> -->
<!-- 				<th>key</th> -->
<!-- 				<th>value</th> -->
<!-- 			</tr> -->
<!-- 		</thead> -->
<!-- 	</table> -->
<span>--------------------------</span><br/>
<span id="jsonSpan"></span>

	<script type="text/javascript">
		var courses = {
			"fruits" : [ {
				"kiwis" : 3,
				"mangues" : 4,
				"pommes" : null
			}, {
				"panier" : true
			}, ],
			"legumes" : {
				"patates" : "amandine",
				"figues" : "de barbarie",
				"poireaux" : false
			}
		};
		
		crvapp.stockageUtil.setJsonValue("dataTest", courses);
		
		var keys = crvapp.stockageUtil.getAllKeys();
		$("label").text(keys);
		var json = crvapp.stockageUtil.getvalueAsJson(keys[0]);
		$("p").text(courses.legumes.patates);
		
		//crvapp.stockageUtil.setJsonValue("dataXML", crvapp.stockageUtil.dataXML);
		//var convertXML = x2js.json2xml(courses);
		//console.log(convertXML);
		//var dataJSON = x2js.xml_str2json(crvapp.stockageUtil.getvalueAsJson("dataXML"));
		//console.log(dataJSON);
		//crvapp.stockageUtil.setJsonValue("dataJSON", dataJSON);
		//$("#jsonSpan").text(dataJSON.grappe.Vol[0].agdhDebut);
	</script>
</body>
</html>